<template>
  <basic-container>
    <div class="main_title warn_f"><b>工作流信息</b></div>
    <el-divider></el-divider>
    <div class="mb20">
      <span class="index_num warn_bg">1</span>
      <b>工作流+签名人员</b>
    </div>
    <table class="owntable wp100" v-if="guifanFilesProcessRecordList[0]">
      <tr>
        <th colspan="2">工作流</th>
        <th>部门</th>
        <th>签名人员</th>
        <th>签名状态</th>
      </tr>
      <tr>
        <td class="white_bg" colspan="2">编制</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[0].createDeptName }}</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[0].createUserName }}</td>
        <td class="white_bg " :class="{ success_f: guifanFilesProcessRecordList[0].isSign == '1' }">{{ guifanFilesProcessRecordList[0].isSign == '1' ? '已签名' : '' }}</td>
      </tr>
      <tr>
        <td class="white_bg" colspan="2">审核</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[1].createDeptName }}</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[1].createUserName }}</td>
        <td class="white_bg success_f" v-if="guifanFilesProcessRecordList[1].checkStatus == 1">
          {{ guifanFilesProcessRecordList[1].isSign == '1' ? '已签名' : '' }}
        </td>
        <td class="white_bg red_f" v-else-if="guifanFilesProcessRecordList[1].checkStatus == 2">未通过</td>
        <td v-else></td>
        <!-- <td class="white_bg " :class="{ success_f: guifanFilesProcessRecordList[1].isSign == '1' }">{{ guifanFilesProcessRecordList[1].isSign == '1' ? '已签名' : '' }}</td> -->
      </tr>

      <tr v-for="(item, i) in shenheNum - 3" :key="i" class="">
        <td class="white_bg" :rowspan="shenheNum - 3" v-if="i == 0">评审</td>
        <td class="white_bg">{{ i + 1 }}</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[i + 2].createDeptName }}</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[i + 2].createUserName }}</td>
        <td class="white_bg success_f" v-if="guifanFilesProcessRecordList[i + 2].checkStatus == 1">
          {{ guifanFilesProcessRecordList[i + 2].isSign == '1' ? '已签名' : '' }}
        </td>
        <td class="white_bg red_f" v-else-if="guifanFilesProcessRecordList[i + 2].checkStatus == 2">未通过</td>
        <td v-else class="white_bg"></td>


        <!-- <td class="white_bg " :class="{ success_f: guifanFilesProcessRecordList[i + 2].isSign == '1' }">{{ guifanFilesProcessRecordList[i + 2].isSign == '1' ? '已签名' : '' }}</td> -->
      </tr>
      <tr>
        <td class="white_bg" colspan="2">批准</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[shenheNum - 1].createDeptName }}</td>
        <td class="white_bg">{{ guifanFilesProcessRecordList[shenheNum - 1].createUserName }}</td>
        <td class="white_bg success_f" v-if="guifanFilesProcessRecordList[shenheNum - 1].checkStatus == 1">
          {{ guifanFilesProcessRecordList[shenheNum - 1].isSign == '1' ? '已签名' : '' }}
        </td>
        <td class="white_bg red_f" v-else-if="guifanFilesProcessRecordList[shenheNum - 1].checkStatus == 2">未通过</td>
        <td v-else></td>
      </tr>
    </table>
  </basic-container>
</template>

<script>
export default {
  props: {
    guifanFilesProcessRecordList: {
      type: Array,
      default() {
        return [];
      }
    },
    shenheNum: {
      type: [Number, String],
      default: 0
    }
  }
};
</script>

<style scoped>
.refundCon {
}
</style>
